﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServiceStack;

namespace TeZhanDui
{
    public enum GAME_CMD
    {
        GET_GAME_STATE,
        OUTPUT_CARD,
        
        MAX
    }

    [Route("/GameTezhandui", "POST")]
    public class GameMessageReq : IReturn<GameMessageResp>
    {
        public GAME_CMD cmd { get; set; }
        public int roomId { get; set; }
        public string usrId { get; set; }
        public int playerIdx { get; set; }
        public int output { get; set; }
        public Boolean cheat { get; set; }
    }

    public class GameMessageResp
    {
        public Boolean success { get; set; }
        public GAME_STATE state { get; set; }
        public int distributeCount { get; set; }
        public int offendCount { get; set; }
        public int defendCount { get; set; }
        public int compareCount { get; set; }
        public int endCount { get; set; }
        public List<GamePlayer> players { get; set; }
        public Playing offender { get; set; }
        public List<Playing> defenders { get; set; }
        public int playerIdx { get; set; }
        public List<int> rest { get; set; }
        
        public GameMessageResp()
        {
            success = true;
            state = GAME_STATE.DISTRIBUTE;
            distributeCount = 3;
            offendCount = 8;
            defendCount = 8;
            compareCount = 4;
            endCount = 4;
            players = null;
            offender = null;
            defenders = null;
            playerIdx = -1;
            rest = null;
        }
    }
}
